home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / INTERNET / SITES / RAND / ALL95.LZH / transcript_1212 / text0005.txt < prev    next >
Encoding:
Text File  |  1995-12-18  |  1.7 KB  |  53 lines

  1.  
  2. On Tue, 28 Nov 1995, Magnus Kollberg wrote:
  3.  
  4. > Have everyone received the latest source from Doug? Did you all get
  5. > this nasty return corrupted files? :-(
  6. > I havn't got the time to fix them this week, but maybe someone else
  7. > would like to do it?
  8. > Is there anyone who have an idea how to fix this? :-(
  9.  
  10. Well, I couldn't get the emacs thing to work (maybe a different keyboard
  11. setup to the machine it was originally done on), and anyway loading,
  12. fixing and saving all those files is a bit boring. So I wrote a small
  13. filter in PERL to do it. Save it off to fix.perl and "chmod a+x fix.perl"
  14. on your friendly local UNIX box and use it in the following way: 
  15.  
  16. > fix.perl < whatever.uue | uudecode
  17.  
  18. You'll get the ZIP file out fine. Note that if perl isn't in
  19. /usr/local/bin on your UNIX system, you'll need to edit the first line
  20. (starting with #!). You can find out where perl is with the command
  21.  
  22. > whereis perl
  23.  
  24. (on SysVr4 systems, anyway). There you go: I don't know much about 
  25. 030 or DSP assembler but maybe I contribute something to the project.
  26.  
  27. ATB,
  28.  
  29. Martin
  30.  
  31. ------------------------8<-----------------------------
  32. #!/usr/local/bin/perl
  33. @input = <STDIN>;
  34. $istream = join("",@input);
  35. @lines = split("\n",$istream);
  36. $buffer = "";
  37. foreach $line (@lines)  {
  38.     $temp = $line;
  39.     if (chop($temp) eq ' ')  {
  40.         $buffer .= $line;
  41.     } else {
  42.         print $buffer,$line,"\n";
  43.         $buffer = "";
  44.     }
  45. }
  46. ------------------------8<-----------------------------
  47.  
  48. *****************************************************************
  49. * ---------------- M.J.Maisey@durham.ac.uk -------------------- *
  50. * - <A HREF="http://www.dur.ac.uk/~d408x2">WWW Home Page </A> - *
  51. *****************************************************************
  52.  
  53.